package com.github.m6d21.sso.model.user.entity;

import static com.github.m6d21.sso.model.constant.CommonConstant.DateConstant.DEFAULT_DATE_FORMAT;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.m6d21.sso.core.annotation.Encrypt;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 *<p>
 *账户表
 *</p>
 *
 * @author liuyang
 * @date 2018-12-05 Wed 18:51:28
 * @since 1.0.0
 */
@ApiModel("账号信息")
@Getter
@Setter
@ToString
public class User implements Serializable {

    private static final long serialVersionUID = 6081997504562421417L;

    @ApiModelProperty("id")
    private Integer id;
    @ApiModelProperty("用户名")
    private String username;
    @ApiModelProperty("昵称")
    private String displayName;
    @Encrypt
    @ApiModelProperty("密码")
    private String password;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("邮箱")
    private String email;
    @ApiModelProperty("头像")
    private String avatar;
    @ApiModelProperty("操作人")
    private String operator;
    @JsonFormat(pattern = DEFAULT_DATE_FORMAT, timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private Date createTime;
    @JsonFormat(pattern = DEFAULT_DATE_FORMAT, timezone = "GMT+8")
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
